package Week02.b;
/**
 * 人员信息类
 */
public class Person {
//    姓名
    public String name;
//    性别
    public String gender;
//    年龄
    public int age;
//    驾龄
    public int years;
//    地址
    public String address;
//    联系电话
    public long contact;
    public Person(){

    }
    public Person(String name,String gender,int age,int years,String address,long contact){
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.years = years;
        this.address = address;
        this.contact = contact;
    }
//    个人信息查询方法
    public void acquire(){
        System.out.println("姓名" + name + "性别" + gender +"年龄" + age +
                "驾龄" + years + "年"+"地址" + address + "联系电话" + contact);
    }
//    个人信息及车辆信息查询方法
    public void search(Car car){
        System.out.println("姓名" + name + "性别" + gender +"年龄" + age + "驾龄" +years+"年"+
          "地址" + address+"联系电话" + contact + "拥有登记车牌号为" + car.license+"的"
                + car.color + car.models + "汽车");
    }
    public static void main(String[] args){
        Person person = new Person("李大","男",20,1,"二环路一段",184752869);
        Car car = new Car("川A6666","白色","五菱");
        person.search(car);
    }
}
